package com.tongqu.mapper;

import com.tongqu.entity.Login;
import com.tongqu.entity.User;
import com.tongqu.protocol.TestUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
@Mapper
public interface UserDao {
    @Select("SELECT count(*) FROM users WHERE name = '${acct}'")
    public int findUserExit(@Param("acct") String acct);
    @Select("SELECT * FROM users WHERE name = '${acct}' and password = '${pass}'")
    public User findUser(@Param("acct") String acct, @Param("pass") String pass);
    int insertUser(Login testUser);
}
